import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'

Vue.config.productionTip = false

//1引入全局的公共样式
import "@/styles/index.scss"

//2全局事件总线
const bus = new Vue()
Vue.prototype.$bus = bus

// 3全局混入
import '@/utils/mixins'

//4引入淘宝适配
import 'lib-flexible'

//5引入vant   一次性引入
import Vant from 'vant'
import 'vant/lib/index.css'
Vue.use(Vant)

//6全局的axios
import {axios} from '@/api/request'
Vue.prototype.$axios = axios;

//7全局组件
import '@/components'

//8全局的ajax
import {ajax} from './api/index'
Vue.prototype.$ajax = ajax

//9 moment时间日期处理插件
import moment from 'moment'
moment.locale()

//10全局配置
import '@/utils'

//11引入mock
import '@/utils/mock'
new Vue({
  router,
  store,
  watch:{
    "$route":function(to,form){
      console.log(to.name);
    }
  },
  render: h => h(App)
}).$mount('#app')
